package filejoiner.method;

import filejoiner.data.Entry;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Luis
 */
public class MethodLoader {

    private List<Method> methods = new ArrayList<Method>();

    public Method loadMethod(Entry entry) {
        String host = entry.getUrl().getHost();
        for (Method method : methods) {
            if (host.contains(method.getHost())) {
                return method;
            }
        }
        return null;
    }

    public List<Method> getMethods() {
        return methods;
    }

    public void setMethods(List<Method> methods) {
        this.methods = methods;
    }
}
